-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EVM] Add 1.0 bridging interface to COA #5664
[EVM] Add 1.0 bridging interface to COA #5664
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/stable-cadence #5664 +/- ##
==========================================================
+ Coverage 55.78% 58.53% +2.74%
==========================================================
Files 997 96 -901
Lines 98760 8129 -90631
==========================================================
- Hits 55094 4758 -50336
+ Misses 39400 2869 -36531
+ Partials 4266 502 -3764
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
3f56e23
to
e73a0a1
Compare
Nice! Should this also be on master? |
@turbolent I suppose it should, though I'm not sure how we're deciding what features live on |
@sisyphusSmiling AFAIK, so far all EVM features are on master. Maybe rebase on master (without entitlements), and then once we merge/sync master into |
@turbolent had some issues trying to rebase on master with this branch. Thinking I'll close this PR and open a new one with a branch upstream from master. |
@sisyphusSmiling Sounds good, either way works! Also happy to help with rebasing this PR if you want |
Closing in favor of #5716 |
Closes: #5663
This PR introduces bridge functionality to the COA resource, enabling a caller to bridge owned NFTs & FTs between VMs. These requests are routed from the calling COA to a
BridgeRouter
implementation which is stored in the EVM contract account. This resource encapsulates and safeguards a Capability on aBridgeAccessor
implementation - defined in a bridge contract and stored in the bridge account - to which theBridgeRouter
routes bridge requests.The
BridgeAccessor
(not in scope for this PR but can be seen in onflow/flow-evm-bridge#28) then passes routed calls through to the VM bridge. Via these new interfaces and their stored implementations, the EVM contract can be integrated with the bridge.Note that simply updating the EVM contract with these changes isn't sufficient to integrate with the bridge as calls to
borrowBridgeAccessor
will revert if aBridgeRouter
is not saved with a validBridgeAccessor
Capability. To fully integrate, the bridge contracts will need to be deployed, aBridgeAccessor
Capability published for the EVM contract account, and the published Capability will need to be saved in aBridgeRouter
stored at the hardcoded storage path of/storage/evmBridgeRouter
. Between the EVM update and the storage of theBridgeRouter
, any bridge-related COA calls will simply fail.